package com.sihan.idc.manager.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 蜗牛数字化
 * @since 2024-08-24
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("device_iot_data")
@Schema(name = "DeviceIotDataEntity", description = "$!{table.comment}")
public class DeviceIotDataEntity extends Model<DeviceIotDataEntity> {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("sn")
    private String sn;

    @TableField("ip")
    private String ip;

    @TableField("temperature")
    private Double temperature;

    @TableField("device_electric")
    private Double deviceElectric;

    @TableField("battery_voltage")
    private Double batteryVoltage;

    @TableField("charging_electric")
    private Double chargingElectric;

    @TableField("charging_voltage")
    private Double chargingVoltage;

    @TableField("battery_level")
    private Double batteryLevel;

    @TableField("create_time")
    private Date createTime;

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
